<?php

namespace app\common\model;

use think\Model;

class Order extends Model
{
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'create_time';
    protected $updateTime = 'update_time';

    const CHECK_STATUS_PASS = 9 ;
    const CHECK_STATUS_NOTPASS = 8 ;
    const CHECK_STATUS_ING = 1 ;

    const TOP_STATUS_TOP = 9 ;
    const TOP_STATUS_NOTOP = 0 ;

    public function user()
    {
        return $this->belongsTo(User::class , 'user_id' , 'id') ;
    }
    public function brand()
    {
        return $this->belongsTo(Brand::class , 'brand_id' , 'id') ;
    }
}